package com._23DesignPattern._create._builder._ex2;

/**
 * @Author: huangya
 * @Date: 2019/9/25
 * @Description:
 */
public class Director {

    Builder mBuilder;
    String mScreen="1920x720";
    String mCPU="双核";
    String mCamera="默认品牌摄像头";

    public Director(Builder builder){
        mBuilder=builder;
    }

    //在这个方法里面调用builder相应的方法
    public void construct(String camera,String screen,String cpu){
        mBuilder.buildCamera(camera);
        mBuilder.builderScreen(screen);
        mBuilder.buildCpu(cpu);
        mBuilder.buildSystem();

    }

    public void construct(String camera){
        this.construct(camera, mScreen, mCPU);

    }

    public void construct(){
        this.construct(mCamera,mScreen,mCPU);

    }

}
